/**
 * 744. 寻找比目标字母大的最小字母
 * @param {character[]} letters
 * @param {character} target
 * @return {character}
 */
var nextGreatestLetter = function (letters, target) {
  for (let i of letters) {
    if (target < i) {
      return i;
    }
  }
  return letters[0]
};

(function () {
  var letters = ["c", "f", "j"];
  letters = ["e", "e", "e", "e", "e", "e", "n", "n", "n", "n"];
  var target = "j"
  target = "e"
}())